package com.lhkj.ct.meta.admin.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lhkj.ct.base.enums.GlobalStatus;
import com.lhkj.ct.base.mybatis.IBaseEntity;
import com.lhkj.ct.base.validator.group.ValGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 岗位表
 * </p>
 *
 * @author jobob
 * @since 2023-09-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TblPost对象", description="岗位表")
public class TblPost implements IBaseEntity<String> {

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "岗位id不能为空", groups = {ValGroups.Update.class})
    @ApiModelProperty(value = "岗位id")
    private String id;

    @NotBlank(message = "请输入岗位编码", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @ApiModelProperty(value = "岗位编码")
    private String postCode;

    @NotBlank(message = "请输入岗位名称", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @ApiModelProperty(value = "岗位名称")
    private String postName;

    @ApiModelProperty(value = "机构id")
    private String organId;

    @NotNull(message = "请输入岗位排序", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @ApiModelProperty(value = "岗位排序")
    private Integer postSort;

    @NotNull(message = "请选择岗位状态", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @ApiModelProperty(value = "岗位状态 0.正常 1.停用")
    private GlobalStatus status;

    @TableField(exist = false)
    @ApiModelProperty(value = "机构名称")
    private String organName;
}
